#+_+ coding:utf-8 +_+

import redis_proxy

class ID(object):
    @staticmethod
    def Genrate():
        id = redis_proxy.GenrateID()
        return id
    

class News (object):
    _id = int()
    _author = str()
    _time = int()
    _star = int()
    _title = str()
    _content = str()
    def __init__(self,id,author,time,star,title,content):
        self._id = id
        self._author = author
        self._time = time
        self._star = star
        self._title = title
        self._content = content

    def Store(self):
        redis_proxy.StoreNews(self)


class IDQueue(object):
    def __init__(self):
        pass
    @staticmethod
    def Enqueue(id):
        redis_proxy.EnqueueID(id)
